/**
 * created by dt at 2025/5/4
 */

import { Entity } from "./Entity";
import { Event } from "./EventBus";

export class EntityCreatedEvent extends Event {
    entity: Entity;

    constructor(entity: Entity) {
        super();
        this.entity = entity;
    }
}

export class EntityRemoveEvent extends Event {
    entity: Entity;

    constructor(entity: Entity) {
        super();
        this.entity = entity;
    }

}

export class EntityArchetypeChangedEvent extends Event {
    entity: Entity;
    oldArchetype: bigint;
    newArchetype: bigint;

    constructor(entity: Entity, oldArchetype: bigint, newArchetype: bigint) {
        super();
        this.entity = entity;
        this.oldArchetype = oldArchetype;
        this.newArchetype = newArchetype;
    }
}

